package com.kuangstudy.aop.limiter;

import com.kuangstudy.aop.log.KsdLog;
import com.kuangstudy.utils.test.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    // 连接点
    @AcessLimiter(timeout = 1,limit = 5)
    @GetMapping("/limiter")
    @KsdLog
    public User limiter(){
        User user = new User();
        user.setNickname("yykk");
        return user;
    }

}
